from app.model.base import *
from sqlalchemy import Index
from sqlalchemy.dialects.mysql import VARCHAR
from sqlalchemy import Column, String, TIMESTAMP, Text

from app.model.base import *
from sqlalchemy import Index
import uuid
class Message(Base):
    __tablename__ = 'message'
    __table_args__ = {'comment': 'Message'}

    id = Column(BIGINT(20), primary_key=True, comment='id')
    user_id = Column(BIGINT(20), comment='用户id')
    content = Column(Text, comment='消息内容')
    message_type = Column(TINYINT(2), comment='消息类型')
    user_type = Column(TINYINT(2), comment='发送用户类型')
    chat_id = Column(BIGINT(20), comment='聊天id')
    
 
indexes=[Index('message_ix', Message.chat_id), Index('mixix', Message.is_deleted, Message.chat_id)]

